import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const login = () => import('../views/user/login.vue')
const home = () => import('../views/home/home.vue')
const gendan =() => import('../views/home/child/gendan.vue')
const find = () => import('../views/find/find.vue')
const play =() => import('../views/play/play.vue')
const cellphone = () => import('../views/user/cellphone.vue')
const zhuce = () => import('../views/user/zhuce.vue')
const loginHome = () => import('../views/user/loginHome.vue')
const comment = () => import('../views/comment/comment.vue')
const paihang = () => import('../views/paihang/paihang.vue')
const findSearch = () => import('../views/find/findSearch.vue')
const mvfind = () => import('../views/find/mvfind.vue')
const user = () => import('../views/user/user.vue')
const gendanXiang = () => import('../views/home/child/gendanXiang.vue')
const shipin = () => import('../views/shipin/shipin.vue')
const songUserXiang = () => import('../views/songUserXiang/songUserXiang.vue')
const songuser = () => import('../views/songuser/songuser.vue')
const newborn = () => import('../views/newborn/newborn.vue')
const newbornText = () => import('../views/newborn/child/newbornPage.vue')
const tvshipin = () => import('../views/tvshipin/tvshipin.vue')

// 子路由
const usermv = () => import('../views/songUserXiang/child/usermv.vue')
const xiangqing = () =>('../views/songUserXiang/child/xiangqing.vue')
const zhuanji = () =>('../views/songUserXiang/child/zhuanji.vue')
const xiangsi = () =>('../views/songUserXiang/child/xiangsi.vue')


const routes = [
  {
    path:'/',
    redirect:'/loginHome'
  },
  {
    path:'/login',
    component:login
  },
  {
    path:'/home',
    component:home,
    meta:{showTab:true}
  },
  {
    path:'/gendan',
    component:gendan,
    meta:{showTab:true}
  },
  {
    path:'/find',
    component:find,
    meta:{showTab:true}
  },
  {
    path:'/play',
    component:play,
  },
  {
    path:'/cellphone',
    component:cellphone,
  },
  {
    path:'/zhuce',
    component:zhuce,
  },
  {
    path:'/loginHome',
    component:loginHome
  },
  {
    path:'/comment',
    component:comment
  },
  {
    path:'/paihang',
    component:paihang
  },
  {
    path:'/findSearch',
    component:findSearch
  },
  {
    path:'/mvfind',
    component:mvfind
  },
  {
    path:'/user',
    component:user,
    meta:{showTab:true}
  },
  {
    path:'/gendanXiang',
    component:gendanXiang
  },
  {
    path:'/shipin',
    component:shipin
  },
  {
    path:'/songuser',
    component:songuser
  },
  {
    path:'/songUserXiang',
    component:songUserXiang,
    children:[
      {path:'usermv',component:usermv},
      {path:'xiangsi',component:xiangsi},
      {path:'zhuanji',component:zhuanji},
      {path:'xiangqing',component:xiangqing},
    ]
  },
  {
    path:'/newborn',
    component:newborn
  },
  {
    path:'/newbornText',
    component:newbornText
  },
  {
    path:'/tvshipin',
    component:tvshipin
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
